package cj.web.marry.dao;
/*
 *  
 *  
*/
import java.util.List;
import java.util.Map;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

/**
 * 
 * @author 
 *
 */
@DAO
public interface VoteItemDAO{
	
    @SQL("SELECT id,voteId,name,descs,img,orderNo,count,status FROM VoteItem where deleteFlag=1 AND voteId=:1 ORDER BY orderNo ")
    List<Map> queryByVoteId(int voteId);
    
    @SQL("SELECT id,voteId,name,descs,img,orderNo,count,status FROM VoteItem where deleteFlag=1 AND id=:1 ")
    List<Map> queryById(int id);
    
    @SQL("UPDATE VoteItem SET count=count+1 WHERE id=:1")
    void updateCount(int id);
}